package com.zhihuishu;

import java.io.BufferedReader;
import java.io.File;
import java.io.FileReader;
import java.util.ArrayList;
import java.util.List;

/**
 * @Author: wangjinliang
 * @Date: 2019/5/31 17:21
 */
public class Utils {
    public static List<String> getListByFile(String filePath) throws Exception {
        List<String> logList = new ArrayList<>();
        File file = new File(filePath);
        BufferedReader br = new BufferedReader(new FileReader(file));
        String result;
        while ((result = br.readLine()) != null) {
            logList.add(result);
        }
        br.close();
        return logList;
    }
}
